import { getToken } from '@/utils/auth'
const defaultSettings = require('../../settings.js')
export default (_self) => {
    return {
        editBtn: true,
        delBtn: true,
        addBtn: true,
        lazy:true,
        labelWidth: 140,
        index: true,
        cellBtn:true,
        indexLabel: '序号',
        align: 'center',
        headerAlign: 'center',
        border: true,
        dialogWidth: '50%',
        stripe: false,
        size: 'mini',
        // excelBtn: true,
        // selection: true,
        searchMenuSpan: 4,
        props: {
            label: 'label',
            value: 'value'
        },
        column: [
            // 普通字段
            {
                width:180,
                label: "编号",
                prop: "id",
                span: 12,
                display:false,
                rules: [{
                    required: true,
                    message: "请输入",
                    trigger: "blur"
                }]
            },
            {
             
                label: "地名",
                prop: "name",
                span: 12,
                cell: true,
                rules: [{
                    required: true,
                    message: "请输入",
                    trigger: "blur"
                }]
            },
            {
                width: 180,
                editDisplay: false,
                row: true,
                span: 12,
                label: "是否启用",
                prop: "state",
                search: true,
                searchSpan: 4,
                type: 'select',
                slot: true,
                dicData: [{
                    label: '启用',
                    value: 1
                }, {
                    label: '禁用',
                    value: 2
                }, ],
                rules: [{
                    required: true,
                    message: '请选择状态',
                    trigger: 'change'
                }],
            },
        ],
    }
}
